<template>
  <view class="edit-employee-clocking">
    
    <!-- 内容表单 -->
    <view class="form-card">
      <view class="form-row" v-for="(item, idx) in fields" :key="idx">
        <text class="label">{{ item.label }}</text>
        <input class="value-input" v-model="item.value" />
      </view>
    </view>
    <!-- 底部按钮 -->
    <view class="footer-btns">
      <button class="cancel-btn" @click="goBack">Cancel</button>
      <button class="save-btn" @click="save">Save</button>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue'

const fields = ref([
  { label: 'Act Del Stps', value: 'Alicia' },
  { label: 'Act Del Pkgs', value: 'Rochefort' },
  { label: 'Act PU Stps', value: 'Company Factory 1' },
  { label: 'Act PU Pkgs', value: 'Shop worker' },
  { label: 'ILS%', value: 'Shop worker' },
  { label: 'ILS Impact Pkgs', value: 'Shop worker' },
  { label: 'Non delvd Stps', value: 'Shop worker' },
  { label: 'Code 85', value: 'Shop worker' },
  { label: 'All Status', value: 'Shop worker' },
  { label: 'Code Pkgs', value: 'Shop worker' },
  { label: "P'L M'L", value: 'Shop worker' },
  { label: 'DNA', value: 'Shop worker' },
  { label: 'Snd Agn', value: 'Shop worker' },
  { label: "Exc's", value: 'Shop worker' },
  { label: 'Date', value: 'Shop worker' },
  { label: 'Veh #', value: 'Shop worker' },
  { label: 'Driver Name', value: 'Shop worker' },
  { label: 'Helper Name', value: 'Shop worker' },
])

const goBack = () => {
  uni.navigateBack()
}
const save = () => {
  uni.showToast({ title: 'Saved', icon: 'success' })
}
</script>

<style scoped>


.form-card {
  background: #fff;
  border-radius: 20rpx;
  margin: 32rpx 24rpx 0 24rpx;
  padding: 0;
  box-shadow: 0 2rpx 8rpx #f0f1f2;
}
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32rpx 24rpx;
  border-bottom: 1px solid #f0f0f0;
  font-size: 30rpx;
}
.form-row:last-child {
  border-bottom: none;
}
.label {
  color: #666;
  width: 250rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.value-input {
  flex: 1;
  margin-left: 24rpx;
  border: none;
  outline: none;
  background: transparent;
  color: #222;
  font-size: 30rpx;
  text-align: left;
}
.footer-btns {
  display: flex;
  justify-content: space-between;
  padding: 32rpx 24rpx;
  background: #f8fafc;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}
.cancel-btn, .save-btn {
  width: 45%;
  height: 88rpx;
  font-size: 32rpx;
  border-radius: 44rpx;
}
.cancel-btn {
  background: #fff;
  color: #12c48b;
  border: 2rpx solid #12c48b;
}
.save-btn {
  background: linear-gradient(90deg, #12c48b, #1edb9b);
  color: #fff;
  border: none;
}
</style>
